SET( CMAKE_CXX_COMPILER "/opt/intel/bin/icpc" )
cmake_minimum_required(VERSION 2.8)

project(GenParaMesh)
find_package(ITK REQUIRED)
  if(ITK_FOUND)
    include(${USE_ITK_FILE})
  else(ITK_FOUND)
    message(FATAL_ERROR, "ITK not found. Please set ITK_DIR.")
  endif(ITK_FOUND)

  find_package(VTK REQUIRED)
  if(VTK_FOUND)
    include(${USE_VTK_FILE})
  else(VTK_FOUND)
    message(FATAL_ERROR, "VTK not found. Please set VTK_DIR.")
  endif(VTK_FOUND)
set(GenParaMesh_SOURCE GenParaMesh.cxx itkMeshTovtkPolyData.cxx)

#GENERATECLP(GenParaMesh_SOURCE GenParaMesh.xml)
add_executable(GenParaMesh ${GenParaMesh_SOURCE})
target_link_libraries( GenParaMesh
  ${ITK_LIBRARIES}
  vtkIO ShapeAlgorithms SparseMatrixLib)

SUBDIRS(Lib)


install(TARGETS
  GenParaMesh
  BUNDLE DESTINATION  bin
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib/static  )
